1. Field of the Invention
The present invention relates to a monitor apparatus for a programmable controller (hereinafter referred to as a “PLC”), and more particularly to a monitor apparatus which is used with a sequential-function-chart (hereinafter referred to as an “SFC”)-type PLC and which can detect an anomalous state and monitor an operation history.
2. Description of the Related Art
SFC is a standard programming language for PLCS and is defined in Draft IEC 1131-1 of IEC (International Electrotechnical Commission). SFC programs have been utilized in place of conventional ladder programs, because of easiness of preparing software in modules and short execution time required for executing the entire program in each scan cycle. The decrease in execution time is achieved through selective execution of activated steps. In an SFC program, steps and transitions are connected as in a flowchart. Each step represents an operation or processing module, whereas each transition represents conditions that must be satisfied for a transition from a preceding step to the next step. An operation program is provided for each step, and a transition-condition program is provided for each transition. Each step can assume two states; i.e., an active state and a non-active state. A step is in the active state when a corresponding execution program is operating. When the conditions for a transition succeeding a certain step are satisfied, the certain step becomes non-active, and the next step becomes active.
When a facility controlled by use of a PLC programmed with such an SFC program is stopped due to, for example, occurrence of a failure, a step which is in an active state at the time of stoppage is searched in order to seek a cause of the stoppage.
A plurality of programs prepared by means of SFC can be executed in parallel, and therefore, a large number of SFC programs are executed in parallel in control performed for a modern facility having sophisticated functions. When a failure occurs in such a facility, each of the programs executed in parallel includes a step which is active at the time of occurrence of the failure, and therefore, a huge amount of time and labor is needed to specify a step which causes the stoppage among a large number of active steps.
Meanwhile, a selective branch can be programmed in each SFC program. In the case of a program including a selective branch, the cause of the stoppage cannot be found through mere searching of an active step. Therefore, in some cases, it is demanded to find an control history before execution of the active step. However, under a conventional technique, it is impossible to know a branched path and a step or steps through which the control has reached the step which is active at present.